<template>
  <div>
    <h2>news content</h2>
    <p>Newsid:{{ $route.params.id }}</p>
    <ul>
      <li>
        <nuxt-link to="/">home</nuxt-link>
      </li>
    </ul>
    <div class="tupian">
      <img src="~/static/timg.jpg" alt="" />
    </div>
  </div>
</template>

<script>
export default {
  validate({ params }) {
    return /^\d+$/.test(params.id);
  }
};
</script>

<style scoped>
.tupian img{
  width: 300px;
}
</style>
